package com.example.xuecheng.contentservice.controller;

import com.example.xuecheng.contentservice.service.impl.CourseCategoryServiceImpl;
import dto.CourseCategoryTreeDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xiehaidong
 *    课程分类管理接口
 */
@RestController
@RequestMapping("/course-category")
@Api(description = "课程分类管理接口")
public class CourseCategoryController {
    @Autowired
    private CourseCategoryServiceImpl courseCategoryService;
    @ApiOperation("查询课程分类接口")
    @GetMapping("/tree-nodes")
    public List<CourseCategoryTreeDto>getCourseCategoryTreeNodes(){
        return courseCategoryService.getCourseCategoryTreeNodes();
    }

}
